package nero.yncc.com.createart.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import nero.yncc.com.createart.R;
import nero.yncc.com.createart.bean.ChangjingBean;
import nero.yncc.com.createart.utils.ImageUtils;

/**
 * Created by Brainstorm on 2017/a3/19.
 * 场景幻灯小图
 */

public class FragmentChangjingSmallPic extends Fragment {

    ChangjingBean.ChangjingInBean beanAd;
    ImageView iv_ad;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.fragment_ad_changjing_detail_small,container,false);
        try {
            beanAd=( ChangjingBean.ChangjingInBean ) getArguments().getSerializable("data");
            iv_ad=view.findViewById(R.id.iv_ad);
            iv_ad.setImageResource(R.mipmap.banner);
            ImageUtils.BindImage(getContext(),iv_ad,beanAd.getPhoto(),4);
        }catch (Exception e){
        }
        return view;
    }
}